3.2.46 \(\int \csc ^2(c+d x) (a+a \sin (c+d x))^n \, dx\) [146]
Optimal. Leaf size=85 \[ -\frac {2^{\frac {1}{2}+n} F_1\left (\frac {1}{2};2,\frac {1}{2}-n;\frac {3}{2};1-\sin (c+d x),\frac {1}{2} (1-\sin (c+d x))\right ) \cos (c+d x) (1+\sin (c+d x))^{-\frac {1}{2}-n} (a+a \sin (c+d x))^n}{d} \]
[Out]
-2^(1/2+n)*AppellF1(1/2,2,1/2-n,3/2,1-sin(d*x+c),1/2-1/2*sin(d*x+c))*cos(d*x+c)*(1+sin(d*x+c))^(-1/2-n)*(a+a*s
in(d*x+c))^n/d
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2866, 2864,
129, 440} \begin {gather*} -\frac {2^{n+\frac {1}{2}} \cos (c+d x) (\sin (c+d x)+1)^{-n-\frac {1}{2}} (a \sin (c+d x)+a)^n F_1\left (\frac {1}{2};2,\frac {1}{2}-n;\frac {3}{2};1-\sin (c+d x),\frac {1}{2} (1-\sin (c+d x))\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[Csc[c + d*x]^2*(a + a*Sin[c + d*x])^n,x]
[Out]
-((2^(1/2 + n)*AppellF1[1/2, 2, 1/2 - n, 3/2, 1 - Sin[c + d*x], (1 - Sin[c + d*x])/2]*Cos[c + d*x]*(1 + Sin[c
+ d*x])^(-1/2 - n)*(a + a*Sin[c + d*x])^n)/d)
Rule 129
Int[((e_.)*(x_))^(p_)*((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> With[{k = Denominator[p]
}, Dist[k/e, Subst[Int[x^(k*(p + 1) - 1)*(a + b*(x^k/e))^m*(c + d*(x^k/e))^n, x], x, (e*x)^(1/k)], x]] /; Free
Q[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] && FractionQ[p] && IntegerQ[m]
Rule 440
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
-q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Rule 2864
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[(-b)*(
d/b)^n*(Cos[e + f*x]/(f*Sqrt[a + b*Sin[e + f*x]]*Sqrt[a - b*Sin[e + f*x]])), Subst[Int[(a - x)^n*((2*a - x)^(m
- 1/2)/Sqrt[x]), x], x, a - b*Sin[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !
IntegerQ[m] && GtQ[a, 0] && GtQ[d/b, 0]
Rule 2866
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[a^Int
Part[m]*((a + b*Sin[e + f*x])^FracPart[m]/(1 + (b/a)*Sin[e + f*x])^FracPart[m]), Int[(1 + (b/a)*Sin[e + f*x])^
m*(d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && !GtQ
[a, 0]
Rubi steps
\begin {align*} \int \csc ^2(c+d x) (a+a \sin (c+d x))^n \, dx &=\left ((1+\sin (c+d x))^{-n} (a+a \sin (c+d x))^n\right ) \int \csc ^2(c+d x) (1+\sin (c+d x))^n \, dx\\ &=-\frac {\left (\cos (c+d x) (1+\sin (c+d x))^{-\frac {1}{2}-n} (a+a \sin (c+d x))^n\right ) \text {Subst}\left (\int \frac {(2-x)^{-\frac {1}{2}+n}}{(1-x)^2 \sqrt {x}} \, dx,x,1-\sin (c+d x)\right )}{d \sqrt {1-\sin (c+d x)}}\\ &=-\frac {\left (2 \cos (c+d x) (1+\sin (c+d x))^{-\frac {1}{2}-n} (a+a \sin (c+d x))^n\right ) \text {Subst}\left (\int \frac {\left (2-x^2\right )^{-\frac {1}{2}+n}}{\left (1-x^2\right )^2} \, dx,x,\sqrt {1-\sin (c+d x)}\right )}{d \sqrt {1-\sin (c+d x)}}\\ &=-\frac {2^{\frac {1}{2}+n} F_1\left (\frac {1}{2};2,\frac {1}{2}-n;\frac {3}{2};1-\sin (c+d x),\frac {1}{2} (1-\sin (c+d x))\right ) \cos (c+d x) (1+\sin (c+d x))^{-\frac {1}{2}-n} (a+a \sin (c+d x))^n}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 15.84, size = 4206, normalized size = 49.48 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
Integrate[Csc[c + d*x]^2*(a + a*Sin[c + d*x])^n,x]
[Out]
-((Csc[c + d*x]^2*(a + a*Sin[c + d*x])^n*(-(AppellF1[1 + 2*n, n, n, 2 + 2*n, (1 - I)/(1 + Tan[(-c + Pi/2 - d*x
)/2]), (1 + I)/(1 + Tan[(-c + Pi/2 - d*x)/2])]*(-1 + Tan[(-c + Pi/2 - d*x)/2])*((-I + Tan[(-c + Pi/2 - d*x)/2]
)/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n) - Appel
lF1[1 + 2*n, n, n, 2*(1 + n), (-1 - I)/(-1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2
])]*((-I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 +
Tan[(-c + Pi/2 - d*x)/2]))^n*(1 + Tan[(-c + Pi/2 - d*x)/2])))/(d*(1 + 2*n)*(Sec[(-c + Pi/2 - d*x)/2]^2)^n*(-1
+ Tan[(-c + Pi/2 - d*x)/2])*(1 + Tan[(-c + Pi/2 - d*x)/2])*(-1/2*((Sec[(-c + Pi/2 - d*x)/2]^2)^(1 - n)*(-(Appe
llF1[1 + 2*n, n, n, 2 + 2*n, (1 - I)/(1 + Tan[(-c + Pi/2 - d*x)/2]), (1 + I)/(1 + Tan[(-c + Pi/2 - d*x)/2])]*(
-1 + Tan[(-c + Pi/2 - d*x)/2])*((-I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-
c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n) - AppellF1[1 + 2*n, n, n, 2*(1 + n), (-1 - I)/(-1 + Tan
[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2])]*((-I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(
-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*(1 + Tan[(-c + Pi/2
- d*x)/2])))/((1 + 2*n)*(-1 + Tan[(-c + Pi/2 - d*x)/2])*(1 + Tan[(-c + Pi/2 - d*x)/2])^2) - ((Sec[(-c + Pi/2
- d*x)/2]^2)^(1 - n)*(-(AppellF1[1 + 2*n, n, n, 2 + 2*n, (1 - I)/(1 + Tan[(-c + Pi/2 - d*x)/2]), (1 + I)/(1 +
Tan[(-c + Pi/2 - d*x)/2])]*(-1 + Tan[(-c + Pi/2 - d*x)/2])*((-I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/
2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n) - AppellF1[1 + 2*n, n, n, 2
*(1 + n), (-1 - I)/(-1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2])]*((-I + Tan[(-c +
Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x
)/2]))^n*(1 + Tan[(-c + Pi/2 - d*x)/2])))/(2*(1 + 2*n)*(-1 + Tan[(-c + Pi/2 - d*x)/2])^2*(1 + Tan[(-c + Pi/2 -
d*x)/2])) - (n*Tan[(-c + Pi/2 - d*x)/2]*(-(AppellF1[1 + 2*n, n, n, 2 + 2*n, (1 - I)/(1 + Tan[(-c + Pi/2 - d*x
)/2]), (1 + I)/(1 + Tan[(-c + Pi/2 - d*x)/2])]*(-1 + Tan[(-c + Pi/2 - d*x)/2])*((-I + Tan[(-c + Pi/2 - d*x)/2]
)/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n) - Appel
lF1[1 + 2*n, n, n, 2*(1 + n), (-1 - I)/(-1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2
])]*((-I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 +
Tan[(-c + Pi/2 - d*x)/2]))^n*(1 + Tan[(-c + Pi/2 - d*x)/2])))/((1 + 2*n)*(Sec[(-c + Pi/2 - d*x)/2]^2)^n*(-1 +
Tan[(-c + Pi/2 - d*x)/2])*(1 + Tan[(-c + Pi/2 - d*x)/2])) + (-1/2*(AppellF1[1 + 2*n, n, n, 2*(1 + n), (-1 - I)
/(-1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2])]*Sec[(-c + Pi/2 - d*x)/2]^2*((-I +
Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + P
i/2 - d*x)/2]))^n) - (AppellF1[1 + 2*n, n, n, 2 + 2*n, (1 - I)/(1 + Tan[(-c + Pi/2 - d*x)/2]), (1 + I)/(1 + Ta
n[(-c + Pi/2 - d*x)/2])]*Sec[(-c + Pi/2 - d*x)/2]^2*((-I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x
)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[(-c + Pi/2 - d*x)/2]))^n)/2 - (((1/4 - I/4)*n*(1 + 2*n)*Appe
llF1[2 + 2*n, n, 1 + n, 1 + 2*(1 + n), (-1 - I)/(-1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2
- d*x)/2])]*Sec[(-c + Pi/2 - d*x)/2]^2)/((1 + n)*(-1 + Tan[(-c + Pi/2 - d*x)/2])^2) + ((1/4 + I/4)*n*(1 + 2*n
)*AppellF1[2 + 2*n, 1 + n, n, 1 + 2*(1 + n), (-1 - I)/(-1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c
+ Pi/2 - d*x)/2])]*Sec[(-c + Pi/2 - d*x)/2]^2)/((1 + n)*(-1 + Tan[(-c + Pi/2 - d*x)/2])^2))*((-I + Tan[(-c + P
i/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/
2]))^n*(1 + Tan[(-c + Pi/2 - d*x)/2]) - n*AppellF1[1 + 2*n, n, n, 2*(1 + n), (-1 - I)/(-1 + Tan[(-c + Pi/2 - d
*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2])]*((-I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x
)/2]))^(-1 + n)*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^n*(1 + Tan[(-c + Pi/2 - d*x)/
2])*(Sec[(-c + Pi/2 - d*x)/2]^2/(2*(-1 + Tan[(-c + Pi/2 - d*x)/2])) - (Sec[(-c + Pi/2 - d*x)/2]^2*(-I + Tan[(-
c + Pi/2 - d*x)/2]))/(2*(-1 + Tan[(-c + Pi/2 - d*x)/2])^2)) - n*AppellF1[1 + 2*n, n, n, 2*(1 + n), (-1 - I)/(-
1 + Tan[(-c + Pi/2 - d*x)/2]), (-1 + I)/(-1 + Tan[(-c + Pi/2 - d*x)/2])]*((-I + Tan[(-c + Pi/2 - d*x)/2])/(-1
+ Tan[(-c + Pi/2 - d*x)/2]))^n*((I + Tan[(-c + Pi/2 - d*x)/2])/(-1 + Tan[(-c + Pi/2 - d*x)/2]))^(-1 + n)*(1 +
Tan[(-c + Pi/2 - d*x)/2])*(Sec[(-c + Pi/2 - d*x)/2]^2/(2*(-1 + Tan[(-c + Pi/2 - d*x)/2])) - (Sec[(-c + Pi/2 -
d*x)/2]^2*(I + Tan[(-c + Pi/2 - d*x)/2]))/(2*(-1 + Tan[(-c + Pi/2 - d*x)/2])^2)) - (-1 + Tan[(-c + Pi/2 - d*x)
/2])*((-I + Tan[(-c + Pi/2 - d*x)/2])/(1 + Tan[...
________________________________________________________________________________________
Maple [F]
time = 0.10, size = 0, normalized size = 0.00 \[\int \left (\csc ^{2}\left (d x +c \right )\right ) \left (a +a \sin \left (d x +c \right )\right )^{n}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(csc(d*x+c)^2*(a+a*sin(d*x+c))^n,x)
[Out]
int(csc(d*x+c)^2*(a+a*sin(d*x+c))^n,x)
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(csc(d*x+c)^2*(a+a*sin(d*x+c))^n,x, algorithm="maxima")
[Out]
integrate((a*sin(d*x + c) + a)^n*csc(d*x + c)^2, x)
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(csc(d*x+c)^2*(a+a*sin(d*x+c))^n,x, algorithm="fricas")
[Out]
integral((a*sin(d*x + c) + a)^n*csc(d*x + c)^2, x)
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (c + d x \right )} + 1\right )\right )^{n} \csc ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(csc(d*x+c)**2*(a+a*sin(d*x+c))**n,x)
[Out]
Integral((a*(sin(c + d*x) + 1))**n*csc(c + d*x)**2, x)
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(csc(d*x+c)^2*(a+a*sin(d*x+c))^n,x, algorithm="giac")
[Out]
integrate((a*sin(d*x + c) + a)^n*csc(d*x + c)^2, x)
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (c+d\,x\right )\right )}^n}{{\sin \left (c+d\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a + a*sin(c + d*x))^n/sin(c + d*x)^2,x)
[Out]
int((a + a*sin(c + d*x))^n/sin(c + d*x)^2, x)
________________________________________________________________________________________